<template>
	<view class="classLayout pagepg">
		<custmon-nav-bar :title="'分类'"></custmon-nav-bar>
		<view class="classfy">
			<thtme-item v-for="i in classify" :classifyList="i" :key="_id" ></thtme-item>
		</view>
	</view>
</template>

<script setup>
import {onMounted, ref} from "vue"
import {request} from "../../utils/request.js"
let classify= ref([])
onMounted(()=>{
	getClassify()
})

//获取分类
const getClassify = () =>{
	// let res =  request({
	// 	url:"/classify",
	// 	method:'GET',
	// 	data:{
			
	// 	}
	// }).then(res=>{
	// 	classify.value = res.data.data
	// })
	uniCloud.callFunction({
		name:"getClassify",
		data:{}
	}).then(res=>{
		classify.value = res.result.data
		console.log("获取分类列表",res);
	})
}
</script>

<style lang="scss">
	.classfy{
		padding: 30rpx;
		display: grid;
		grid-template-columns: repeat(3,1fr);
		gap: 15rpx;
	}
</style>
